package com.lanou.pianke.admin.service.impl;

import com.lanou.pianke.admin.entity.Preply;
import com.lanou.pianke.admin.mapper.PreplyMapper;
import com.lanou.pianke.admin.service.PreplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PreplyServiceImpl implements PreplyService {
    @Autowired
    private PreplyMapper preplyMapper;


    @Override
    public List<Preply> showAllByPcommentId(String pcommentId) {
        return preplyMapper.selectAllByPcommentId(pcommentId);
    }

    @Override
    public List<Preply> showReported() {
        return preplyMapper.selectReported();
    }

    @Override
    public void deleteByReported() {
        preplyMapper.updateStatusByReported();
    }

    @Override
    public void deletePreply(String pcommentId) {
        preplyMapper.updateStatusByPcommentId(pcommentId);
    }

    @Override
    public void deleteByUid(Long uid) {
        preplyMapper.updateStatusByUid(uid);
    }


}
